<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script>
			var stu2 = {
				id: 2,
				name: "王五",
				age: 19
			}
			//for...in..
			for(var i in stu2)
			{
				document.write(i+","+stu2[i]+"<br/>")
			}
			//2.with
			with(stu2)
			{
				document.write(id+","+name+","+age);
			}
		</script>
		
	</body>
</html>